import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        scanner.close();
        int mo,cha,shang;
        if(a>b)
        {
            cha=a-b;
            shang=a/b;
            mo=a%b;


            System.out. println(cha+" "+shang+" "+mo);
        }
        else{
            cha=b-a;
            shang=b/a;
            mo=b%a;
            System.out. println(cha+" "+shang+" "+mo);
        }
        //write your code here......


    }
}